package br.com.projetus.persistencia;

import java.io.Serializable;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 * Devolve a instancia do entityManager para ser usado pelo jpa
 *
 * @author Fabricio S Costa fabriciojf@gmail.com
 * @since 01/12/2009
 * @version 1.0
 */
public class JpaUtil implements Serializable {
    
	private static final long serialVersionUID = 1L;
	private static EntityManagerFactory factory;
    
    static{
        factory = Persistence.createEntityManagerFactory("eqteste");
    }
    
    public static EntityManager getEntityManager(){
        return factory.createEntityManager();
    }

}
